﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    /// <summary>
    /// 分页类
    /// </summary>
    public class PageData<T>
    {
        private int _PageIndex = 0;
        private int _PageSize = 10;
        private int _Count = 0;
        private int _PageCount = 0;
        private List<T> _DataSoure = null;

        /// <summary>
        /// 当前页码
        /// </summary>
        public int PageIndex
        {
            set { _PageIndex = value; }
            get { return _PageIndex; }
        }

        /// <summary>
        /// 每页显示条数
        /// </summary>
        public int PageSize
        {
            set { _PageSize = value; }
            get { return _PageSize; }
        }

        /// <summary>
        /// 总记录数
        /// </summary>
        public int Count
        {
            set { _Count = value; }
            get { return _Count; }
        }

        /// <summary>
        /// 总页码数
        /// </summary>
        public int PageCount
        {
            set { _PageCount = value; }
            get { return _PageCount; }
        }

        /// <summary>
        /// 数据集
        /// </summary>
        public List<T> DataSoure
        {
            set { _DataSoure = value; }
            get { return _DataSoure; }
        }
    }
}
